/*
 * @Author: mayijun
 * @Date: 2022-05-10 17:17:34
 * @LastEditors: mayijun
 * @LastEditTime: 2022-06-30 14:45:26
 */

// 指标管理
//  --指标库 /indexlib
//  --修饰词 /modifier
//  --统计粒度 /statistics
//  --维度管理 /dimension
//  --前台设置 /foreground
//  --后台设置 /background
import { RouteRecordRaw } from 'vue-router';
import * as RouteNames from '../consts';
const routes: RouteRecordRaw[] = [
  {
    path: '/manage',
    component: () => import('@/layout/index.vue'),
    redirect: '/manage/indexlib',
    meta: { title: '指标管理' },
    children: [
      {
        path: 'foreground/settings',
        component: () => import('@/views/indexManage/frontSettings/index'),
        meta: { title: '前台管理' }
      },
      {
        path: 'background/settings',
        component: () => import('@/views/indexManage/backgroundSettings/index'),
        meta: { title: '后台管理' }
      },
      {
        path: 'statistics',
        name: RouteNames.ROUTE_STATISTICS,
        component: () => import('@/views/indexManage/statistics'),
        meta: { title: '统计粒度管理' }
      },
      {
        path: 'modifier',
        name: RouteNames.ROUTE_MODIFER,
        component: () => import('@/views/indexManage/modifiermanage/index'),
        meta: { title: '修饰词管理' }
      },
      {
        path: 'dimension',
        name: RouteNames.ROUTE_DIMENSIONMGMT,
        component: () => import('@/views/indexManage/dimension/index'),
        meta: { title: '维度管理' }
      },
    ]
  },
  {
    path: '/manage/indexlib',
    redirect: '/manage/indexlib/create',
    component: () => import('@/layout/index.vue'),
    meta: { title: '指标库' },
    children: [
      {
        path: 'create',
        name: RouteNames.ROUTE_INDEXMANAGE,
        component: () =>
          import('@/views/indexManage/indexlib/indexCreate/index'),
        meta: { title: '指标定义' }
      },
      {
        path: 'edit',
        name: RouteNames.ROUTE_INDEXMANAGEEDIT,
        component: () =>
          import('@/views/indexManage/indexlib/indexCreate/index'),
        meta: { title: '编辑指标' }
      },
      {
        path: 'base',
        name: RouteNames.ROUTE_ATOMINDEXMANAGE,
        component: () => import('@/views/indexManage/indexlib/base/index'),
        meta: { title: '指标元信息管理' }
      },
      {
        path: 'info',
        name: RouteNames.ROUTE_INDEXMANAGEINFO,
        component: () => import('@/views/indexManage/indexlib/info/index'),
        meta: { title: '指标详情' }
      },
     
    ]
  }
];

export default routes;
